<?php
exit;
include_once("./c/config.php");
 
$mysqli = new mysqli($dbhost, $dbuser, $dbpwd, $dbName);
$mysqli->set_charset("utf8");


$name='三年级';
$query=$mysqli->query("select count(id) as count from `users` WHERE `nianji` LIKE '".$name."' ");
$data=$query->fetch_array();
$shu=$data['count'];
echo  $name,' : ',$shu;
$data=$query=$name=$shu=NULL;
echo "<br />";

$name='四年级';
$query=$mysqli->query("select count(id) as count from `users` WHERE `nianji` LIKE '".$name."' ");
$data=$query->fetch_array();
$shu=$data['count'];
echo  $name,' : ',$shu;
$data=$query=$name=$shu=NULL;
echo "<br />";

$name='五年级';
$query=$mysqli->query("select count(id) as count from `users` WHERE `nianji` LIKE '".$name."' ");
$data=$query->fetch_array();
$shu=$data['count'];
echo  $name,' : ',$shu;
$data=$query=$name=$shu=NULL;
echo "<br />";
echo "<br />";
echo "<br />";

$qu=json_decode(file_get_contents('./c/qu.txt'), true);
foreach ($qu as $v){
    
    $name=$v;
    $query=$mysqli->query("select count(id) as count from `users` WHERE `qu` LIKE '".$name."' ");
    $data=$query->fetch_array();
    $shu=$data['count'];
    echo  $name,' : ',$shu;
    $data=$query=$name=$shu=NULL;
    echo "<br />";
    
}
 




 
 
 